﻿using System;

/* www.vsrtl.com */

namespace VsRtl_CSharp.Delegate
{
    public delegate void MyDelegate(int c);

    public class VsRtl_DelegateInit
    {
        public void DoSomething(int value)
        {
            //Do Something..
        }
        public void DoAnything(MyDelegate method)
        {

        }

        public void TheMainMethod()
        {
            MyDelegate d1 = DoSomething;
            MyDelegate d2 = new MyDelegate(DoSomething);
            DoAnything(delegate(int v1) {
                if (v1 < 10) ;
            });
            MyDelegate d3 = delegate(int v1) {
               // ....
            };
            DoAnything((x) =>
            {

            });
            // Lambda Expression
            MyDelegate d4 = (x) => {
               
            };
        }
    }
}
